package service

import (
	//"git.oschina.net/fanbuchi/xgggh/oauth2/proto/role"
)

type Service struct {
	allowedRoles []string
}

// NewService starts a new Service instance
/*func NewService() *Service {
	return &Service{
		allowedRoles:com_xgggh_srv_oauth2.RoleType_name,
	}
}*/


func  SearchPage(originPage,originPerage int64) (limit int64,offset int64) {
	var page int64=1;
	if originPage>0 {
		page=originPage
	}
	if originPerage>0 {
		limit=originPerage
	}else{
		limit=18
	}
	offset=(page-1)*limit
	return limit,offset
}
